package cn.edu.cdcas.service;

import cn.edu.cdcas.entity.Exam;
import cn.edu.cdcas.mapper.ExamMapper;
import cn.edu.cdcas.vo.QuestionNum;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("examService")
public class ExamService {

    @Resource
    private ExamMapper examMapper;

    public QuestionNum findNum(int examId) {
        Exam exam = examMapper.findNum(examId);
        QuestionNum questionNum = new QuestionNum();
        questionNum.setDanxuanNum(exam.getRadioNum());
        questionNum.setDanxuanScore(exam.getRadioScore());
        questionNum.setDuoxuanNum(exam.getCheckNum());
        questionNum.setDuoxuanScore(exam.getCheckScore());
        questionNum.setPanduanNum(exam.getJudgeNum());
        questionNum.setPanduanScore(exam.getJudgeScore());
        return questionNum;
    }

}
